<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>
    <div id="app">
        <!-- <div>{{msg}}</div> -->
        <!-- v-text指令  v-text="表达式" -->
        <!-- <div v-text="msg"></div> -->
        <!-- <div v-text="htmlMsg"></div> -->
        <!-- <div v-html="htmlMsg"></div> -->
        <div v-html="msg"></div>
    </div>


    <!-- 引入vue -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
        const { createApp, ref } = Vue;
        // 创建Vue实例
        const app = createApp({
            setup() {
                const msg = ref('hello')
                const htmlMsg = ref('<h1>hello</h1>')

                return {
                    msg,
                    htmlMsg
                }
            }
        })
        // 挂载到dom
        app.mount('#app')
    </script>
</body>

</html>